#include <stdio.h>
#include "../zjson.h"

int main(void) {
    jval * json = zJSON_new_jval(OBJ);
    jval * item1 = zJSON_new_double(12.83);
    jval * item2 = zJSON_new_int(13);
    jval * item3 = zJSON_new_null();
    jval * item4 = zJSON_new_true();
    jval * item5 = zJSON_new_string("hello!");
    jval * arr = zJSON_new_jval(ARR);
    zJSON_set_arr_value(arr,item1);
    zJSON_set_arr_value(arr,item2);
    zJSON_set_arr_value(arr,item3);
    zJSON_set_arr_value(arr,item4);
    zJSON_set_arr_value(arr,item5);
    zJSON_set_key(json,"c");
    zJSON_set_key(json,"d");
    zJSON_del_arr_item(arr,0);
    zJSON_rpl_arr_item(arr,1,item4);
    jval * nul = zJSON_new_jval(NUL);
    zJSON_set_key_value(json,"c",arr);
    zJSON_set_key_value(json,"d",nul);
    zJSON_colorfy(json);
    printf("\n");
    zJSON_free_jval(json);
}
